<div class="widgets">
<ba-card title="">
    <div class="form col-sm-11">
        <div class="form-group row">
            <div class="col-sm-6">
                <div class="input-group">
                    <span class="input-group-addon" id="sizing-addon2"><i class="fa fa-search"></i>搜索</span>
                    <input type="text" class="form-control" placeholder="search" aria-describedby="sizing-addon2" [(ngModel)]="searchText">
                </div>
            </div>
        </div>
    </div>

    <div>
        <button class="btn btn-primary" (click)="onNew()">新增</button>
    </div>
</ba-card>

<ba-card title=""> 
    <bus-detail   [bus]="selectedBus" (onVoted) = "getBuss()" ></bus-detail>
</ba-card>

<ba-card title="司机列表">

<table class="table table-bordered table-hover">
    <thead>
        <th>ID</th>
        <th>车辆编号</th>
        <th>车牌号码</th>
        <th>人数</th>
        <th>承运商</th>
        <th>是否有效</th>
    </thead>
    <tbody>
        <tr *ngFor="let bus of buss" [class.selected]="bus === selectedBus" (click)="onSelect(bus)">
            <td>
                <span class="badge">{{bus.bus_id}}</span></td>
            <td>{{bus.bus_code}} </td>
            <td>{{bus.plate_number}} </td>
            <td>{{bus.persons}} </td>
            <td>{{bus.carrier_name}}</td>
            <td>{{bus.status}}</td>
        </tr>
    </tbody>
</table>
</ba-card>
